<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 标签选择器 */
        p{
            color: red;
        }
        /* 类选择器 */
        .aa{
            font-size: 30px;
            background: pink;
        }
        .bb{
            font-weight: bold;
            text-decoration: underline;
        }
        .b2{
            font-family: 楷体;
        }
        /* id选择器 */
        #cc{
            color: blue;
            font-size: 40px;
        }
        /* 复合选择器 */
        p#a1{
            background: green;
            font-size: 30px;
        }
        span.a2{
            color: red;
            text-decoration: line-through;
            font-size: 40px;
        }
        /* 组合选择器（集体声明） */
        h3, .abc{
            color: orange;
            font-size: 30px;
            text-decoration: underline;
        }
        h3{
            background: pink;
        }
        /* 嵌套选择器 */
        div span{ 
            font-size: 50px;
        }
        /* 伪类选择器 */
        a:link,a:visited{
            text-decoration: none;
            color: black;
            font-size: 14px;
        }
        a:hover, a:active{
            text-decoration: underline;
            color: orange;
        }
    </style>
</head>
<body>
    <!-- 通过id属性调用id选择器 -->
    <div id="cc">world</div>
    <span class="a2">嘿嘿</span>
    <!-- 通过class属性调用类选择器 -->
    <p class="aa bb">welcome</p>
    <span class="aa">happy</span>
    <h2 class="b2">哈哈</h2>
    <p id="a1">hello</p>

    <h3>中国</h3>
    <div class="abc">棒棒哒</div>
    
    <span>1111</span>
    <div>
        <span>2222</span>
    </div>

    <a href="http://www.163.com">网易</a>
</body>
</html>